<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>
    // let a = "hahahaha"
    // alert(a.length)
    // let b = null
    // let c
    // console.log(b + 10) //10
    // console.log(c + 10) //NAN

    //创建对象
    // let object = {
    //     name: "蔡徐坤",
    //     age: 18,
    //     sayHello: function () {
    //         console.log("hello cai!")
    //     }
    // };
    // console.log(object.name);
    // console.log(object["name"]);
    // console.log(object["age"]);
    // console.log(object.sayHello());

    //使用new object创建对象
    let person = new Object();
    person.name = "zhangsan";
    person.age = 20;
    person.sayHello = function () {
        console.log("hello！！！");
    }
    console.log(person.name);
    console.log(person["age"]);
    console.log(person.sayHello());



</script>

</html>